<g:render template="/common/messages" model="${pageScope.getVariables() + [bean:user]}" />

<h1>MPEMS Registration</h1>
<br/>
<div id="registerForm" class="userForm">
    <g:set var="formBody">
	<table width="50%" align="center">
       <thead>
        	<tr>
            	<th align='left'><font color='#808080' size="2">Account Information</font> </th>
        	</tr>
    	</thead>
    	<tbody>
            <tr>
                <td align='left'>
       			 	<g:textField name="login" value="${params.login}" class="span5" placeholder="* Username"/>
                </td>
            </tr>
            <tr>
                <td align='left'>
                	<g:field type="password" name="password" value="${params.password}" class="span5" placeholder="* Password"/>
				</td>
            </tr>
            <tr>
                <td align='left'>
                	<g:field type="password" name="password2" value="${params.password2}" class="span5" placeholder="* Confirm Password"/>
				</td>
            </tr>
    	</tbody>
	</table>
	</br>
	<table width="50%" align="center">
       <thead>
        	<tr>
            	<th align='left'><font color='#808080' size="2">Personal Information</font></th>
        	</tr>
    	</thead>
    	<tbody>
            <tr>
                <td height="40" align='left'>
       				<g:radio name="gender" value="M"/>Male  <g:radio name="gender" value="F"/>Female
                </td>
            </tr>
            
            <tr>
                <td align='left'>
                	<g:textField name="name" value="${params.name}" class="span5" placeholder="* Full Name"/>
				</td>
            </tr>

            <tr>
                <td align='left'>
                	<g:textField name="email" value="${params.email}" class="span5" placeholder="* Email"/>
				</td>
            </tr>
            <tr>
                <td align='left'>
                	<g:textField name="mobile" value="${params.mobile}" class="span5" placeholder="* Mobile number"/>
				</td>
            </tr>
            <tr>
                <td align='left'>
                	<g:textField name="addressLine1" value="${params.addressLine1}" class="span5" placeholder="Address Line 1"/>
				</td>
            </tr>
          
            <tr>
                <td align='left'>
                	 <g:textField name="addressLine2" value="${params.addressLine2}" class="span5" placeholder="Address Line 2"/>
				</td>
            </tr>
          
            <tr>
                <td align='left'>
                	<g:textField name="addressLine3" value="${params.addressLine3}" class="span5" placeholder="Postal"/>
				</td>
            </tr>
    	</tbody>
	</table>
	<br/>
        <g:hiddenField name="originalURI" value="${originalURI}" />
        <g:submitButton name="Submit" value="Register" class="btn btn-primary" />
    </g:set>

    <g:formRemote name="register" url="[controller:'user',action:'register']" update="contentPane">
        ${formBody}
    </g:formRemote>
</div>

<g:render template="/common/messages_effects" model="${pageScope.getVariables()}" />
